module Puppet::Parser::Functions
  newfunction(:set_role_attr) do |args|
    address = args[0]
    roleid = args[1]
    rname = args[2]
    rvalue = args[3]
    cmd = "curl -s \"%s/status/setRoleAttr?roleid=%s&name=%s&value=%s\"" % [address, roleid, rname, rvalue]
    puts cmd
    system(cmd)
  end
end
